﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace DomainModel.Entities
{
    public class Vehicle
    {
        [KeyAttribute]
        [HiddenInput(DisplayValue = false)]
        public int VehicleId { get; set; }

        [HiddenInput(DisplayValue = false)]
        public DateTime? LastUpdate { get; set; }

        [HiddenInput(DisplayValue = false)]
        public bool IsApproved { get; set; }

        [HiddenInput(DisplayValue = false)]
        public string UserName { get; set; }

        [Display(Name = "Brand Id")]
        [HiddenInput(DisplayValue = false)]
        public int VehicleBrandId { get; set; }

        [StringLength(300, ErrorMessage = "The Model value cannot exceed 300 characters. ")]
        [Required(ErrorMessage = "Model is required field.")]
        [Display(Name = "Model")]
        public string Model { get; set; }

        [Display(Name = "Category Id")]
        [HiddenInput(DisplayValue = false)]
        public int VehicleCategoryId { get; set; }

        [Display(Name = "Is Ac")]
        public bool? IsAc { get; set; }

        [Display(Name = "Passengers")]
        public int? Passengers { get; set; }

        [Display(Name = "Fuel Type")]
        public string FuelType { get; set; }

        [Display(Name = "نوع الوقود")]
        public string FuelType_Ar { get; set; }

        [StringLength(500, ErrorMessage = "The Name value cannot exceed 500 characters. ")]
        [Required(ErrorMessage = "Name is required field.")]
        [Display(Name = "Name")]
        public string Name { get; set; }

        [StringLength(500, ErrorMessage = "يمكن أن تكون القيمة اسم لا يتجاوز 500 حرفا ")]
        [Required(ErrorMessage = "مطلوب اسم الحقل")]
        [Display(Name = "الاسم في اللغة العربية")]
        public string Name_Ar { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Display(Name = "وصف بالعربية")]
        public string Description_Ar { get; set; }

        [ForeignKey("VehicleBrandId")]
        public virtual VehicleBrand VehicleBrand { get; set; }

        [ForeignKey("VehicleCategoryId")]
        public virtual VehicleCategory VehicleCategory { get; set; }
    }
}
